//
//  HLPageViewController.m
//  LearningRoad
//
//  Created by Zhl on 2017/9/13.
//  Copyright © 2017年 LearningRoad. All rights reserved.
//

#import "HLPageViewController.h"
#import "HLPageView.h"
@interface HLPageViewController ()
{
    UIStepper *_stepper;
    HLPageView *_pageView;
}


@end

@implementation HLPageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _stepper = [[UIStepper alloc] initWithFrame:CGRectMake(100, 200, 60, 30)];
    _stepper.minimumValue = 0.0;
    _stepper.maximumValue = 3;
    _stepper.stepValue = 1.0;
    [_stepper addTarget:self action:@selector(stepperValueChanged:) forControlEvents:UIControlEventValueChanged];
    [self.view addSubview:_stepper];
    
    _pageView = [[HLPageView alloc] initWithFrame:CGRectMake(20, 100, 200, 20) andPageNum:4 andCurrentPage:0 andCurrentImg:@"currentPage" andNormalImg:@"normalPage"];
    [self.view addSubview:_pageView];
    // Do any additional setup after loading the view.
}
-(void)stepperValueChanged:(UIStepper*)stepper{
    _pageView.currentPage = stepper.value;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
